<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>留言列表</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    
    <link rel="stylesheet" href="/res/words/weui.css">
    <link rel="stylesheet" href="/res/words/jquery-weui.css">
    <link rel="stylesheet" href="/res/words/style.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_729135_t2loq20h12.css">
    
    <script src="/res/words/jquery.min.js"></script>
    <script src="/res/words/jquery-weui.min.js"></script>
   
    <style>
    
    </style>
</head>
<body class="back1">    
    <div class="index-top-fix">
        <a href="{:url('index/gupiao.mycenter/mycenter')}" class="iconfont icon-left- left"></a>
        <p class="title">留言</p>     
    </div>
    <div class="mt50"></div>
    
    <div class="weui-cells weui-cells_form"style="width: 95%;margin: 0 auto;">
        <div class="weui-cell">
        <div class="weui-cell__bd">
        <textarea class="weui-textarea" id="words" placeholder="请输入留言" rows="5"></textarea>
        </div>
        </div>
    </div> 
    <div style="width: 95%;margin: 15px auto">
        <a href="javascript:;" class="weui-btn weui-btn_primary" onclick="refer(this)">提交</a>
    </div>
</body>
<script>
 function refer(that){
    var words=$('#words').val();
    console.log(words);
    $.post('{:url("words")}',{words:words},function(res){
        if(res.code==1){
           // $.alert(res.msg,function () {
                $.toast(res.msg);
                    // 定时跳转
                    setTimeout(function(){
                    location.href="{:url('index/gupiao.mycenter/mycenter')}";
                    console.log("success");
                    },1500);
              // });
        }else{
            $.alert(res.msg,function () {
                  return false;
              });
        }
    })
 }
</script>
</html>

